package com.qianfeng.wang.guangjie2.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.qianfeng.wang.guangjie2.R;
import com.qianfeng.wang.guangjie2.config.AppConfig;

/**
 * Created by gw555 on 2015/7/6.
 */
public class ShViewPagerFragment extends AppBaseFragment {
    @ViewInject(R.id.listview_fhfragment_pulltorefresh)
    private PullToRefreshListView pullToRefreshListView;
    private String url;
    private String page=""+1;



    public ShViewPagerFragment(String str) {
       if (str!=null){
           if(str==AppConfig.ONLINESTORE){
               url="http://sapi2.yimeishow.com/index.php?null&top=10&token=JlXYOfA6GvWgk4KmydfJG5OUeoEx2agLuCCg&page="+page+"&action=AndrBrand.onlineStore2&format=json";

           }else if(str==AppConfig.SOLIDSTORE){
               url="http://sapi2.yimeishow.com/index.php?null&token=JlXYOfA6GvWgk4KmydfJG5OUeoEx2agLuCCg&top=10&page="+page+"&action=AndrBrand.solidStore2&cname=&cityid=2&format=json";

           }

       }
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fhviewpager_fragment, container, false);
        ViewUtils.inject(this, view);
        loadData();
        initView();
        return view;
    }

    private void loadData() {

    }

    private void initView() {
        pullToRefreshListView=new PullToRefreshListView(getActivity());
    }
}
